#include <bits/stdc++.h>
#define ll long long
using namespace std;

const int Mod=1e9+7;
const int inv2=(Mod+1)/2;
int n,m,x;
bool Tid=1;
inline ll ksm(ll a,ll b,int mod){
    b%=(mod-1);
    ll z=1;
    while(b){
        if(b&1) z=z*a%mod;
        a=a*a%mod;
        b>>=1;
    }
    return z;
}

ll prd=1,Y;
int a[1022],cnt,kk[1022];
ll ans;

void dfs(int p){
    if(p==x){
        a[x]=Y;
        cnt++;
        dfs(p+1);
        return ;
    }
    if(p==n+1){
        ll res=0;
        for(int i=1;i<n;i++) res=res^(a[i]*a[i+1])%prd;
        // for(int i=1;i<=n;i++) cout<<a[i]<<" ";
        // puts("");
        res%=prd;
        ans=(ans+res)%Mod;
        return ;
    }
    for(int i=0;i<prd;i++){
        a[++cnt]=i;
        dfs(p+1);
        cnt--;
    }
}

int main(){
    freopen("pearl.in","r",stdin);
    freopen("pearl.out","w",stdout);
    scanf("%d%d%d",&n,&m,&x);
    for(int i=1;i<=m;i++){
        int p;
        prd*=2;
        scanf("%1d",&kk[i]);
        // Y=Y*2+p;
    }
    for(int i=m;i;i--) Y=Y*2+kk[i];
    dfs(1);

    cout<<ans;

    return 0;
}
/*
2 2 1
01
*/